package com.shiikong_memory.yez.MySQLAPI.Dao;

import com.shiikong_memory.yez.MySQLAPI.JavaBean.LotteryDataBean;
import com.shiikong_memory.yez.MySQLAPI.JavaBean.NoticeBean;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface LotteryDataMapper {
    @Select("select * from lotterydata")
    List<LotteryDataBean> getAll();
    @Select("select * from lotterydata where KookId=#{KookId}")
    LotteryDataBean getByChatChannelId(@Param("KookId") String KookId);
    @Insert("insert into lotterydata(KookId, ts, data, size)values(#{KookId},#{ts},#{data},#{size})")
    boolean addNotice(@Param("KookId") String KookId, @Param("ts") long ts, @Param("data") String data, @Param("size") long size);
    @Update("update lotterydata set ts=#{ts},data=#{data},size=#{size} where KookId=#{KookId}")
    boolean updateByKookId(@Param("KookId") String KookId, @Param("ts") long ts, @Param("data") String data, @Param("size") long size);
    @Delete("delete from lotterydata where KookId=#{KookId}")
    boolean deleteByKookId(@Param("KookId") String KookId);
}
